<?php require VIEW_PATH.'/header.php';?>
<body>
<div class="hd-menu-list">
<ul>
    <li class="active">
    	<a href="#">商品类型</a>
    </li>
    <li><a href="{{U('add')}}">添加类型</a></li>
</ul>
</div>
<table class="hd-table hd-table-list">
<thead>
<tr>
    <td>ID</td>
    <td>类型名称</td>
    <td>操作</td>
</tr>
</thead>
<tbody>
<!-- 接收控制器穿过来的值，遍历数据 -->
<?php foreach($data as $field):?>
<tr>
    <td>{{$field['id']}}</td>
    <td>
        {{$field['type_name']}}
    </td>
    <td class="hd-w150">
        <a href="{{U('ShopAttr/index',array('id'=>$field['id']))}}">商品属性</a> |
        <a href="{{U('edit',array('id'=>$field['id']))}}">修改</a>
    </td>
</tr>
<?php endforeach;?>
<!-- 遍历结束 -->
</tbody>
</table>
</body>
</html>